<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jQuery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .goods_tab {
            width: 400px;
            height: 600px;
            background-color: skyblue;
            margin: 100px auto;
        }

        .left ul {
            float: left;
            width: 50px;
            height: 600px;
        }

        .left ul li {
            list-style: none;
            width: 50px;
            height: 150px;
            background-color: springgreen;
        }

        .right {
            float: left;
            width: 350px;
            height: 600px;
        }

        .right div {
            display: none;
            width: 350px;
            height: 600px;
        }

        .right div img {
            width: 350px;
            height: 600px;
        }

        .right .shows {
            display: block;
        }
    </style>
</head>

<body>
    <div class="goods_tab">
        <div class="left">
            <ul>
                <li>1</li>
                <li>2</li>
                <li>3</li>
                <li>4</li>
            </ul>
        </div>
        <div class="right">
            <div class="shows"><img src="../images/1.jpg" alt=""></div>
            <div><img src="../images/2.jpg" alt=""></div>
            <div><img src="../images/3.jpg" alt=""></div>
            <div><img src="../images/4.jpg" alt=""></div>
        </div>
    </div>
    <script>
        $(function () {
            $(".left ul li").mouseover(function () {
                var index = $(this).index();
                console.log(index);
                $(this).css("background", "pink");
                $(this).siblings("li").css("background", "");
                $(".right div").eq(index).show();
                $(".right div").eq(index).siblings("div").hide();
            })
        })
    </script>
</body>

</html>